package com.hanmanyi.scanning.util;

/**
 * 返回的状态码
 *
 * @author roach
 * @date 2017/12/8
 */
public enum HttpCode
{

    OK(200, "成功"),
    NOT_FOUND(404, "路径不存在"),
    ERROR(500, "系统未知异常"),

    UNAUTHORIZED(401 , "用户未登陆"),
    MISSING_PARAMETERS(9001, "缺少参数"),
    ILLEGAL_PARAMETERS(9002, "非法的参数"),
    PARAMETER_TYPE_ERROR(9003, "参数类型错误"),
    SIGN_ERROR(9004, "签名错误"),
    ADDRESS_EXPIRED(9005, "地址已过期"),
    ILLEGAL_REQUEST(9006, "非法的请求"),
    NOT_AUTHORIZED_TO_VISIT(9007, "您没有访问权限"),
    FILE_UPLOAD_EXCEEDS_MAXIMUM_LIMIT(9008, "文件上传超过最大限制"),
    LIST_NULL_ERROR(901, "没有找到匹配的记录"),
    TOKEN_NOUSED_ERROR(902, "TOKEN失效"),

    /**
     * 常用模块错误common
     */
    COMMON_PASSWORD_ERROR(1001, "账号或密码错误"),
    COMMON_LOCKED(1002, "账号已冻结"),
    COMMON_CANCEL(1003, "账号已注销"),
//    COMMON_LOGIN_IN(1004, "账号已登录"),
    /**
     * 财务模块finance
     */
    FINANCE_ERROR(2001, "财务模块的错误"),

    /**
     * 商户模块merchant
     */
    MERCHANT_ERROR(3001, "商户模块的错误"),
    PUT_FORWARD_OK(200, "提现成功"),
    PUT_FORWARD_ERROR(3003, "提现失败"),

    /**
     * 运维模块monitor
     */
    MONITOR_ERROR(4001, "运维模块的错误"),
    REFUND_TICKET_ERROR(200, "退票异常"),
    REFUND_TICKET_SUCCESS(200, "退票成功"),
    ADD_TICKET_ERROR(4004, "添加分票失败"),
    ADD_TICKET_SUCCESS(200, "添加分票成功"),
    TOPPRIZECONFIRM_ERROR(4005,"大奖确认失败"),
    UPDATE_ALARM_READ_ERROR(4005, "更新告警信息已读状态失败"),
    SCRAP_NAME_NOT_EXIST_ERROR(40004,"刮奖员不存在"),
    TICKET_ID_ERROR(40005,"分票票号区间有票已分配或不存在"),
    ADD_ERROR_TICKET_ERROR(4110,"添加错票失败"),
    ADD_ERROR_TICKET_SUCCESS(200, "添加错票成功"),
    DEL_ERROR_TICKET_ERROR(4111,"删除失败"),

    /**
     * 票据模块lotteryManage
     */

    MANAGE_ERROR(5001, "票据模块的错误"),

    ADD_CHECK_ERROR(5002, "起始票号到张数末号码间已有存在票号"),
    INSERT_TICKET_ERROR(5003, "彩票录入失败"),
    ADDLOTTERY_ERROR(5004, "新增失败，彩种已存在"),

    LOTTERYSIZE_ERROR(5005,"彩票尺寸录入错误"),

    LOTTERYDATA_ERROR(5006,"数据录入异常"),


    LOTTERYOPERATE_ERROR(5007,"操作失败"),

    /**
     * 高级管理模块senior
     */
    MENU_REPEAT_ERROR(6001, "菜单已存在"),
    ROLR_REPEAT_ERROR(6002,"角色已存在"),
    AREA_REPEAT_ERROR(6003,"区域已存在"),
    USER_REPEAT_ERROR(6004,"用户已存在"),
    USER_NOT_EXIST_ERROR(6005,"用户不存在"),


    /**
     * 刮奖模块
     */
    STOP_ORDER_ERROR(8001, "停止接单操作错误"),
    EXIT_SCRATCH_ERROR(8002, "退出刮奖错误"),
    WINDOW_MEANTANCE_ERROR(8004, "窗口维护操作错误"),
    TERMINAL_MEANTANCE_ERROR(8005, "窗口维护操作错误"),
    APPLY_EXCHANGE_ERROR(8003, "申请换班操作错误"),
    PICNAME_NOTMATCH_ORDERID(8007, "图片名称无法匹配任何订单信息"),

    /**
     * 个人信息修改
     */
    IDENTIFY_CODE_SEND_ERROR(7001,"获取验证码失败"),
    IDENTIFY_CODE_EXPIRE_ERROR(7002,"验证码过期"),
    IDENTIFY_CODE_ERROR(7003,"输入的验证码错误"),
    PHONE_ERROR(7004,"输入的手机号错误"),
    PASSWORD_ORIGINAL_ERROR(7005,"输入的原密码错误"),
    PASSWORD_EQUALS_ERROR(7006,"新密码和原密码不能相同");



    private final int code;
    private final String message;

    HttpCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}